## Loading required package: data.table
## data.table 1.14.2 using 1 threads (see ?getDTthreads).  Latest news: r-datatable.com
## **********
## This installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode.
## This is a Mac. Please read https://mac.r-project.org/openmp/. Please engage with Apple and ask them for support. Check r-datatable.com for updates, and our Mac instructions here: https://github.com/Rdatatable/data.table/wiki/Installation. After several years of many reports of installation problems on Mac, it's time to gingerly point out that there have been no similar problems on Windows or Linux.
## **********
## 
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
## 
##     between, first, last
## The following object is masked from 'package:purrr':
## 
##     transpose
## Loading required package: knitr
## 
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
## 
##     combine

Test Organizations

Test Organizations
TestOrgNumber EIN Name State MajorGroup NTEE.CC TotalExpense CEOCompensation
1 237392118 THE LEARNING CENTER AT PIPER’S HILL CT 2 B20 2221843 92539.91
2 350868101 HUNTINGTON UNIVERSITY IN 11 B43 42079670 408004.44
3 208969896 BROWN COUNTY ORAL HEALTH PARTNERSHIP WI 4 E99 3744664 116212.53
4 160743979 NICHOLAS H NOYES MEMORIAL HOSPITAL NY 12 E22 59517721 223204.75
5 260317963 REDLINE CO 1 A40 1752816 118630.15
6 943019570 THE PROTEIN SOCIETY CA 7 U03 1200932 173402.65
7 205935069 QUIT DOC RESEARCH AND EDUCATION FL 2 B05 1661923 89324.41

Weight Sets

Weight Set 1

level geo r.mission s.mission
1 1 1 1
2 1 1 1
3 1 1 1
4 1 1
5 1

Weight Set 2

level geo r.mission s.mission
1 2 3 3.0
2 2 2 2.0
3 1 1 1.0
4 1 1.0
5 0.5

Weight Set 3

level geo r.mission s.mission
1 5 5 5.0
2 2 2 2.0
3 1 1 1.0
4 1 1.0
5 0.5

Basic Comparison Plots

X facet (columns) is weight set number, Y facet (rows) is test org number.

These are the plots for the unnormalized distances

These are the plots for the normalized distances

Correlation Plots

directories <- paste0(current.dir)

plots <- list.files(directories, pattern="*.jpg")
plots <- paste0( directories, "/", plots)

index <- 1

if(length(plots > 0)){
  p <-paste0('<table border="1">')
# #create an html table with float left/right, whatever....
  for(i in seq(1,length(plots),nrow(weights))){
    p <- paste0(p, '<tr>')
    
    for(j in 1:nrow(weights) ){
      p <- paste0(p, '<td height="450"><img src="',plots[i+j-1],'" height="400" width="400"/></td>')
    }
    p <- paste0(p, '</tr>')
    
    
    }
p <- paste0(p, '</table>')
}

cat(p)

Proxy Subway plot


Test Set 1
[1] “Correlations for Test Org 1”

First Weight Set Second Weight Set corr(Distance) cor(Rank)
1 2 0.99009 0.99829
1 3 0.99008 0.99828
2 3 0.99998 1.00000


Test Set 2
[1] “Correlations for Test Org 2”

First Weight Set Second Weight Set corr(Distance) cor(Rank)
1 2 0.99727 0.99446
1 3 0.99349 0.98548
2 3 0.99893 0.99733


Test Set 3
[1] “Correlations for Test Org 3”

First Weight Set Second Weight Set corr(Distance) cor(Rank)
1 2 0.96635 0.94893
1 3 0.96640 0.94915
2 3 0.99998 0.99993


Test Set 4
[1] “Correlations for Test Org 4”

First Weight Set Second Weight Set corr(Distance) cor(Rank)
1 2 0.97732 0.97444
1 3 0.97733 0.97447
2 3 0.99999 0.99997


Test Set 5
[1] “Correlations for Test Org 5”

First Weight Set Second Weight Set corr(Distance) cor(Rank)
1 2 0.98080 0.99163
1 3 0.98079 0.99158
2 3 0.99999 0.99997


Test Set 6
[1] “Correlations for Test Org 6”

First Weight Set Second Weight Set corr(Distance) cor(Rank)
1 2 0.98778 0.99665
1 3 0.98776 0.99663
2 3 0.99998 0.99999


Test Set 7
[1] “Correlations for Test Org 7”

First Weight Set Second Weight Set corr(Distance) cor(Rank)
1 2 0.99761 0.99610
1 3 0.99487 0.99106
2 3 0.99931 0.99870